package grafico;

import javax.swing.ImageIcon;
import javax.swing.JPanel;

import java.awt.Canvas;
import java.awt.Color;
import javax.swing.JLabel;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JTextField;
import javax.swing.LayoutStyle.ComponentPlacement;
import java.awt.Font;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class Menu extends JPanel {

	/**
	 * Create the panel.
	 */
	public Menu(final PantallaPrincipal frame) {
		ImageIcon img=new ImageIcon(this.getClass().getResource("/imagenes/icono.jpg"));
		
		setBackground(new Color(105, 105, 105));
		setForeground(new Color(128, 128, 0));
		
		
		JLabel icono = new JLabel(img);
		
		JLabel lblHotelLaribera = new JLabel("Hotel LaRibera");
		lblHotelLaribera.setForeground(Color.WHITE);
		lblHotelLaribera.setBackground(Color.WHITE);
		lblHotelLaribera.setFont(new Font("Tahoma", Font.BOLD, 30));
		
		JButton btnReservarHabitacin = new JButton("Reservar Habitaci\u00F3n");
		btnReservarHabitacin.setFont(new Font("Tahoma", Font.BOLD, 14));
		btnReservarHabitacin.setBackground(new Color(250, 128, 114));
		btnReservarHabitacin.setForeground(Color.WHITE);
		btnReservarHabitacin.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
			}
		});
		
		JButton btnCancelarReserva = new JButton("Cancelar Reserva");
		btnCancelarReserva.setFont(new Font("Tahoma", Font.BOLD, 14));
		btnCancelarReserva.setBackground(new Color(250, 128, 114));
		btnCancelarReserva.setForeground(Color.WHITE);
		
		JButton btnOcuparHabitacin = new JButton("Ocupar Habitaci\u00F3n");
		btnOcuparHabitacin.setFont(new Font("Tahoma", Font.BOLD, 14));
		btnOcuparHabitacin.setBackground(new Color(250, 128, 114));
		btnOcuparHabitacin.setForeground(Color.WHITE);
		
		JButton btnGestionarPasajero = new JButton("Gestionar Pasajero");
		btnGestionarPasajero.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				gestionarPasajero(frame);
			}
		});
		btnGestionarPasajero.setFont(new Font("Tahoma", Font.BOLD, 14));
		btnGestionarPasajero.setBackground(new Color(250, 128, 114));
		btnGestionarPasajero.setForeground(Color.WHITE);
		
		JButton btnGestionarResponsableDe = new JButton("Gestionar Responsable de Pago");
		btnGestionarResponsableDe.setFont(new Font("Tahoma", Font.BOLD, 14));
		btnGestionarResponsableDe.setBackground(new Color(250, 128, 114));
		btnGestionarResponsableDe.setForeground(Color.WHITE);
		
		JButton btnFacturar = new JButton("Facturar");
		btnFacturar.setFont(new Font("Tahoma", Font.BOLD, 14));
		btnFacturar.setBackground(new Color(250, 128, 114));
		btnFacturar.setForeground(Color.WHITE);
		
		JButton btnIngresarNotaDe = new JButton("Ingresar Nota de Cr\u00E9dito");
		btnIngresarNotaDe.setFont(new Font("Tahoma", Font.BOLD, 14));
		btnIngresarNotaDe.setBackground(new Color(250, 128, 114));
		btnIngresarNotaDe.setForeground(Color.WHITE);
		
		JButton btnIngresarPago = new JButton("Ingresar Pago");
		btnIngresarPago.setFont(new Font("Tahoma", Font.BOLD, 14));
		btnIngresarPago.setBackground(new Color(250, 128, 114));
		btnIngresarPago.setForeground(Color.WHITE);
		
		
		JButton btnGestionarListados = new JButton("Gestionar Listados");
		btnGestionarListados.setFont(new Font("Tahoma", Font.BOLD, 14));
		btnGestionarListados.setBackground(new Color(250, 128, 114));
		btnGestionarListados.setForeground(Color.WHITE);
		
		GroupLayout groupLayout = new GroupLayout(this);
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addGap(75)
					.addComponent(lblHotelLaribera)
					.addGap(378)
					.addComponent(icono)
					.addContainerGap(20, Short.MAX_VALUE))
				.addGroup(groupLayout.createSequentialGroup()
					.addGap(124)
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addComponent(btnGestionarListados, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 224, Short.MAX_VALUE)
						.addComponent(btnIngresarPago, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 224, Short.MAX_VALUE)
						.addComponent(btnIngresarNotaDe, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 224, Short.MAX_VALUE)
						.addComponent(btnFacturar, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 224, Short.MAX_VALUE)
						.addComponent(btnGestionarResponsableDe, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 224, Short.MAX_VALUE)
						.addComponent(btnGestionarPasajero, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 224, Short.MAX_VALUE)
						.addComponent(btnOcuparHabitacin, GroupLayout.DEFAULT_SIZE, 224, Short.MAX_VALUE)
						.addComponent(btnCancelarReserva, GroupLayout.DEFAULT_SIZE, 224, Short.MAX_VALUE)
						.addComponent(btnReservarHabitacin, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
					.addGap(491))
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addGap(7)
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addGroup(groupLayout.createSequentialGroup()
							.addGap(52)
							.addComponent(lblHotelLaribera))
						.addComponent(icono, GroupLayout.PREFERRED_SIZE, 141, GroupLayout.PREFERRED_SIZE))
					.addGap(37)
					.addComponent(btnReservarHabitacin)
					.addPreferredGap(ComponentPlacement.RELATED)
					.addComponent(btnCancelarReserva)
					.addPreferredGap(ComponentPlacement.RELATED)
					.addComponent(btnOcuparHabitacin)
					.addPreferredGap(ComponentPlacement.RELATED)
					.addComponent(btnGestionarPasajero)
					.addPreferredGap(ComponentPlacement.RELATED)
					.addComponent(btnGestionarResponsableDe)
					.addGap(4)
					.addComponent(btnFacturar)
					.addPreferredGap(ComponentPlacement.RELATED)
					.addComponent(btnIngresarNotaDe)
					.addPreferredGap(ComponentPlacement.RELATED)
					.addComponent(btnIngresarPago)
					.addPreferredGap(ComponentPlacement.RELATED)
					.addComponent(btnGestionarListados)
					.addGap(57))
		);
		setLayout(groupLayout);

	}
	private void gestionarPasajero(PantallaPrincipal frame) {
		this.setVisible(false);
		frame.setContentPane(new GestionarPasajero_02(frame));
		
	}
}
